/*
 * BaseResponse.java
 * business
 *
 * Created by ChenTao on 2016/9/9.
 *
 * Copyright (c) 2016年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.net;

import com.google.gson.annotations.SerializedName;
import com.yidiandao.business.utils.GsonProvider;

/** 响应的基类. */
public class BaseResponse {

    /** 接口返回的状态码 */
    @SerializedName("code")
    private int code;

    /** 接口响应信息 */
    @SerializedName("msg")
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String toJson() {
        return GsonProvider.getGson().toJson(this);
    }
}
